package com.keya.features.tool;

import com.keya.device.Device;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author : xf.he
 * @version : 1.0 2023/11/2
 * @since : 1.0
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class DicomNetParams {
    private String calledAE;
    private String calledIP;
    private String calledPort;
    private String callingAE;
    private Integer timeout;

    public DicomNetParams convert(Device device) {
        this.setCalledAE(device.getAetitle()).setCalledIP(device.getIp())
                .setCalledPort(device.getPort());
        return this;
    }
}
